<?php
require_once('gogradient.php');
$keys = array('fade_from', 'fade_to', 'start', 'end', 'width', 'height', 'type');
$width = 1;
$type = 'vertical';
foreach($keys as $key){
	if ( isset($_GET[$key]))
		$$key = $_GET[$key];
	#error_log("got $key=>".$$key);
}
$steps = $height;						// number of steps creating the gradient

$fill = new gd_gradient_fill();
if(isset($fadeColors))
		 $fill->gradient_image_colors(1, $height, 'vertical',$fadeColors);
isset($start) ? $image = $fill->gradient_image_part(1, $height, 'vertical',$fade_from, $fade_to, $start, $end):
$image = $fill->gradient_image(1, $height, 'vertical',$fade_from, $fade_to);

?>